﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Registration.aspx.cs" Inherits="JoinParty.admin.FlowStep.Registration" %>

<%@ Register Src="../Control/UserMessage.ascx" TagName="UserMessage" TagPrefix="UC" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <script src="../../../../Resource/js/jquery/jquery.min.js"></script>
    <script src="../../../../Resource/ueditor/ueditor.config.js"></script>
    <script src="../../../../Resource/ueditor/ueditor.all.min.js"></script>
</head>
<body>
    <form id="form1" runat="server">
        <f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />

        <f:Panel ID="Panel1" ShowBorder="false" ShowHeader="false" AutoScroll="true" runat="server">
            <Toolbars>
                <f:Toolbar ID="Toolbar1" runat="server" Position="Bottom" ToolbarAlign="Center">
                    <Items>
                        <f:Button ID="btnSaveClose" ValidateForms="SimpleForm1" Icon="SystemSaveClose" OnClick="btnSaveClose_Click"
                            runat="server" Text="保存并关闭">
                        </f:Button>
                        <f:Button ID="btnSubmit" runat="server" CssClass="marginr" Icon="Tick" OnClick="btnSubmit_Click"
                            Text="提交">
                        </f:Button>
                        <f:Button ID="btnClose" Icon="SystemClose" EnablePostBack="false" runat="server"
                            Text="关闭">
                        </f:Button>
                    </Items>
                </f:Toolbar>
            </Toolbars>
            <Items>
                <f:SimpleForm ID="SimpleForm1" ShowBorder="false" ShowHeader="false" runat="server"
                    BodyPadding="10px" Title="SimpleForm" Width="650px">
                    <Items>
                        <f:ContentPanel ID="cPanel" runat="server" ShowBorder="false" ShowHeader="false">
                            <div style="padding-left: 30px">
                                <UC:UserMessage ID="UserM" runat="server" />
                            </div>
                        </f:ContentPanel>
                        <f:Label ID="lbWorkGuide" Label="工作指引" runat="server" Hidden="true" EncodeText="false"></f:Label>
                        <f:DropDownList ID="ddlPoliticalReview" runat="server" Label="审核情况" Hidden="true" LabelAlign="right">
                            <f:ListItem Value="1" Text="通过" Selected="true" />
                            <f:ListItem Value="2" Text="退回" />
                            <f:ListItem Value="3" Text="取消入党" />
                        </f:DropDownList>
                        <f:TextBox ID="txtTitle" runat="server" Label="标题" Required="true" ShowRedStar="true" LabelAlign="right" EmptyText="例如：2016年9月1日至2016年10月1日" Hidden="true"></f:TextBox>
                        <%-- 这里要改成ck --%>
                        <%--<f:HtmlEditor ID="heRegistration" runat="server" LabelAlign="right" Height="230px" Width="630px"></f:HtmlEditor>--%>
                        <f:Label ID="lbRegistration" runat="server" LabelAlign="right"></f:Label>
                        <f:ContentPanel ID="cpRegistration" runat="server" ShowBorder="false" ShowHeader="false" Title="baad">
                            <script type="text/plain" name="editor1" id="editor1"></script>
                        </f:ContentPanel>

                        <%-- 这里是ck 20180725更换为下面ueditor --%>
                        <%--<f:HtmlEditor ID="heBranchOpinion" runat="server" Label="支部意见" Hidden="true" LabelAlign="right" Width="630px"></f:HtmlEditor>--%>

                        <f:Label ID="lbBranchOpinion" runat="server" Label="支部意见" Hidden="true" LabelAlign="left"></f:Label>
                        <f:ContentPanel ID="cpBranchOpinion" runat="server" ShowBorder="false" Hidden="true" ShowHeader="false" Title="baad">
                            <script type="text/plain" name="editor2" id="editor2"></script>
                        </f:ContentPanel>

                        <%-- 这里是上传照片 --%>
                        <f:Image ID="imgPhoto" CssClass="photo" ImageUrl="~/Content/icon/blank1.png" ImageWidth="100" ShowEmptyLabel="true" runat="server" Hidden="true">
                        </f:Image>
                        <f:FileUpload runat="server" ID="filePhoto" ShowRedStar="false" ShowEmptyLabel="true" Label="照片" Hidden="true" LabelAlign="right"
                            ButtonText="上传证书文件" ButtonOnly="true" Required="false" ButtonIcon="ImageAdd"
                            AutoPostBack="true" OnFileSelected="filePhoto_FileSelected">
                        </f:FileUpload>
                        <f:HiddenField ID="hdFileId" runat="server" Label="照片" Hidden="true"></f:HiddenField>
                        <f:HiddenField ID="hdEditorValue" runat="server" Label="注册" Hidden="true"></f:HiddenField>


                    </Items>
                </f:SimpleForm>
            </Items>
        </f:Panel>
    </form>
</body>
</html>
<script>
    var containerClientID = '<%= SimpleForm1.ClientID %>';
    var editor1, editor2;
    var config = {
        initialFrameWidth: '100%',
        initialFrameHeight: '400px',
        enableAutoSave: false,
        saveInterval: 100000,
        elementPathEnabled: false,
        autoHeightEnabled: false,
        autoFloatEnabled: false,
        onready: function () {
        }
    };
    F.ready(function () {
        config.onready = function () {
            // 重新布局外部容器
            doLayout();
            updateEditor(editor1, '<%= this.RegistrationContent%>');
        }
        editor1 = UE.getEditor('editor1', config);

        config.onready = function () {
            // 重新布局外部容器
            doLayout();
            updateEditor(editor2, '<%= this.BranchOpinionContent%>');
        }
        editor2 = UE.getEditor('editor2', config);

    });

    // 更新编辑器内容
    function updateEditor(editor, content) {
        if (editor && editor.isReady) {
            editor.setContent(content);
        }
    }

    function doLayout() {
        if ((editor1 && editor1.isReady) && (editor2 && editor2.isReady)) {
            // 重新布局外部容器
            F(containerClientID).doLayout();
        }
    }
</script>
